↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
snake_in_gaa(Pattern, Cols, Rows) → U5_gaa(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_gaa(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_gaa(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_aaaa(nil, X, X1, nil) → produce_snake_out_aaaa(nil, X, X1, nil)
produce_snake_in_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_aaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_aaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_aaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_aaaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_gaa(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_gaa(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
coil_it_in_ag(nil, X) → coil_it_out_ag(nil, X)
coil_it_in_ag(cons(Line, Lines), odd) → U12_ag(Line, Lines, coil_it_in_ag(Lines, even))
coil_it_in_ag(cons(Line, Lines), even) → U13_ag(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
reverse_in_aaa(nil, Reversed, Reversed) → reverse_out_aaa(nil, Reversed, Reversed)
reverse_in_aaa(cons(Head, Tail), SoFar, Reversed) → U16_aaa(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aaa(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aaa(cons(Head, Tail), SoFar, Reversed)
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_ag(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_ag(Line, Lines, coil_it_in_ag(Lines, odd))
U14_ag(Line, Lines, coil_it_out_ag(Lines, odd)) → coil_it_out_ag(cons(Line, Lines), even)
U12_ag(Line, Lines, coil_it_out_ag(Lines, even)) → coil_it_out_ag(cons(Line, Lines), odd)
U7_gaa(Pattern, Cols, Rows, coil_it_out_ag(Snake, odd)) → snake_out_gaa(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_gaa(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PrologToPiTRSProof
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
snake_in_gaa(Pattern, Cols, Rows) → U5_gaa(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_gaa(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_gaa(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_aaaa(nil, X, X1, nil) → produce_snake_out_aaaa(nil, X, X1, nil)
produce_snake_in_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_aaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_aaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_aaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_aaaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_gaa(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_gaa(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
coil_it_in_ag(nil, X) → coil_it_out_ag(nil, X)
coil_it_in_ag(cons(Line, Lines), odd) → U12_ag(Line, Lines, coil_it_in_ag(Lines, even))
coil_it_in_ag(cons(Line, Lines), even) → U13_ag(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
reverse_in_aaa(nil, Reversed, Reversed) → reverse_out_aaa(nil, Reversed, Reversed)
reverse_in_aaa(cons(Head, Tail), SoFar, Reversed) → U16_aaa(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aaa(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aaa(cons(Head, Tail), SoFar, Reversed)
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_ag(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_ag(Line, Lines, coil_it_in_ag(Lines, odd))
U14_ag(Line, Lines, coil_it_out_ag(Lines, odd)) → coil_it_out_ag(cons(Line, Lines), even)
U12_ag(Line, Lines, coil_it_out_ag(Lines, even)) → coil_it_out_ag(cons(Line, Lines), odd)
U7_gaa(Pattern, Cols, Rows, coil_it_out_ag(Snake, odd)) → snake_out_gaa(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_gaa(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
TEST_SNAKE_IN_GGG(Pattern, C, R) → U1_GGG(Pattern, C, R, s2l_in_ga(C, Cols))
TEST_SNAKE_IN_GGG(Pattern, C, R) → S2L_IN_GA(C, Cols)
S2L_IN_GA(s(X), cons(X1, Y)) → U4_GA(X, X1, Y, s2l_in_ga(X, Y))
S2L_IN_GA(s(X), cons(X1, Y)) → S2L_IN_GA(X, Y)
U1_GGG(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_GGG(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U1_GGG(Pattern, C, R, s2l_out_ga(C, Cols)) → S2L_IN_GA(R, Rows)
U2_GGG(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_GGG(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
U2_GGG(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → SNAKE_IN_GAA(Pattern, Cols, Rows)
SNAKE_IN_GAA(Pattern, Cols, Rows) → U5_GAA(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
SNAKE_IN_GAA(Pattern, Cols, Rows) → INFINITE_SNAKE_IN_GAA(Pattern, InfSnake, InfSnake)
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → U8_GAA(A, R, T, S, infinite_snake_in_gaa(R, T, S))
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → INFINITE_SNAKE_IN_GAA(R, T, S)
U5_GAA(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_GAA(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
U5_GAA(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → PRODUCE_SNAKE_IN_AAAA(Rows, Cols, InfSnake, Snake)
PRODUCE_SNAKE_IN_AAAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_AAAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
PRODUCE_SNAKE_IN_AAAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → PART_OF_SNAKE_IN_AAAA(Cols, InfSnake, NewInfSnake, Part)
PART_OF_SNAKE_IN_AAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_AAAA(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
PART_OF_SNAKE_IN_AAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → PART_OF_SNAKE_IN_AAAA(R, Rings, RestSnake, RestRings)
U9_AAAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_AAAA(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U9_AAAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → PRODUCE_SNAKE_IN_AAAA(Rows, Cols, NewInfSnake, Tail)
U6_GAA(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_GAA(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
U6_GAA(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → COIL_IT_IN_AG(Snake, odd)
COIL_IT_IN_AG(cons(Line, Lines), odd) → U12_AG(Line, Lines, coil_it_in_ag(Lines, even))
COIL_IT_IN_AG(cons(Line, Lines), odd) → COIL_IT_IN_AG(Lines, even)
COIL_IT_IN_AG(cons(Line, Lines), even) → U13_AG(Line, Lines, reverse2_in_aa(Line, Line1))
COIL_IT_IN_AG(cons(Line, Lines), even) → REVERSE2_IN_AA(Line, Line1)
REVERSE2_IN_AA(List, Reversed) → U15_AA(List, Reversed, reverse_in_aga(List, nil, Reversed))
REVERSE2_IN_AA(List, Reversed) → REVERSE_IN_AGA(List, nil, Reversed)
REVERSE_IN_AGA(cons(Head, Tail), SoFar, Reversed) → U16_AGA(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
REVERSE_IN_AGA(cons(Head, Tail), SoFar, Reversed) → REVERSE_IN_AAA(Tail, cons(Head, SoFar), Reversed)
REVERSE_IN_AAA(cons(Head, Tail), SoFar, Reversed) → U16_AAA(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
REVERSE_IN_AAA(cons(Head, Tail), SoFar, Reversed) → REVERSE_IN_AAA(Tail, cons(Head, SoFar), Reversed)
U13_AG(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_AG(Line, Lines, coil_it_in_ag(Lines, odd))
U13_AG(Line, Lines, reverse2_out_aa(Line, Line1)) → COIL_IT_IN_AG(Lines, odd)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
snake_in_gaa(Pattern, Cols, Rows) → U5_gaa(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_gaa(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_gaa(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_aaaa(nil, X, X1, nil) → produce_snake_out_aaaa(nil, X, X1, nil)
produce_snake_in_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_aaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_aaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_aaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_aaaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_gaa(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_gaa(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
coil_it_in_ag(nil, X) → coil_it_out_ag(nil, X)
coil_it_in_ag(cons(Line, Lines), odd) → U12_ag(Line, Lines, coil_it_in_ag(Lines, even))
coil_it_in_ag(cons(Line, Lines), even) → U13_ag(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
reverse_in_aaa(nil, Reversed, Reversed) → reverse_out_aaa(nil, Reversed, Reversed)
reverse_in_aaa(cons(Head, Tail), SoFar, Reversed) → U16_aaa(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aaa(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aaa(cons(Head, Tail), SoFar, Reversed)
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_ag(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_ag(Line, Lines, coil_it_in_ag(Lines, odd))
U14_ag(Line, Lines, coil_it_out_ag(Lines, odd)) → coil_it_out_ag(cons(Line, Lines), even)
U12_ag(Line, Lines, coil_it_out_ag(Lines, even)) → coil_it_out_ag(cons(Line, Lines), odd)
U7_gaa(Pattern, Cols, Rows, coil_it_out_ag(Snake, odd)) → snake_out_gaa(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_gaa(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ PrologToPiTRSProof
TEST_SNAKE_IN_GGG(Pattern, C, R) → U1_GGG(Pattern, C, R, s2l_in_ga(C, Cols))
TEST_SNAKE_IN_GGG(Pattern, C, R) → S2L_IN_GA(C, Cols)
S2L_IN_GA(s(X), cons(X1, Y)) → U4_GA(X, X1, Y, s2l_in_ga(X, Y))
S2L_IN_GA(s(X), cons(X1, Y)) → S2L_IN_GA(X, Y)
U1_GGG(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_GGG(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U1_GGG(Pattern, C, R, s2l_out_ga(C, Cols)) → S2L_IN_GA(R, Rows)
U2_GGG(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_GGG(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
U2_GGG(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → SNAKE_IN_GAA(Pattern, Cols, Rows)
SNAKE_IN_GAA(Pattern, Cols, Rows) → U5_GAA(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
SNAKE_IN_GAA(Pattern, Cols, Rows) → INFINITE_SNAKE_IN_GAA(Pattern, InfSnake, InfSnake)
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → U8_GAA(A, R, T, S, infinite_snake_in_gaa(R, T, S))
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → INFINITE_SNAKE_IN_GAA(R, T, S)
U5_GAA(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_GAA(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
U5_GAA(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → PRODUCE_SNAKE_IN_AAAA(Rows, Cols, InfSnake, Snake)
PRODUCE_SNAKE_IN_AAAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_AAAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
PRODUCE_SNAKE_IN_AAAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → PART_OF_SNAKE_IN_AAAA(Cols, InfSnake, NewInfSnake, Part)
PART_OF_SNAKE_IN_AAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_AAAA(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
PART_OF_SNAKE_IN_AAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → PART_OF_SNAKE_IN_AAAA(R, Rings, RestSnake, RestRings)
U9_AAAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_AAAA(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U9_AAAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → PRODUCE_SNAKE_IN_AAAA(Rows, Cols, NewInfSnake, Tail)
U6_GAA(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_GAA(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
U6_GAA(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → COIL_IT_IN_AG(Snake, odd)
COIL_IT_IN_AG(cons(Line, Lines), odd) → U12_AG(Line, Lines, coil_it_in_ag(Lines, even))
COIL_IT_IN_AG(cons(Line, Lines), odd) → COIL_IT_IN_AG(Lines, even)
COIL_IT_IN_AG(cons(Line, Lines), even) → U13_AG(Line, Lines, reverse2_in_aa(Line, Line1))
COIL_IT_IN_AG(cons(Line, Lines), even) → REVERSE2_IN_AA(Line, Line1)
REVERSE2_IN_AA(List, Reversed) → U15_AA(List, Reversed, reverse_in_aga(List, nil, Reversed))
REVERSE2_IN_AA(List, Reversed) → REVERSE_IN_AGA(List, nil, Reversed)
REVERSE_IN_AGA(cons(Head, Tail), SoFar, Reversed) → U16_AGA(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
REVERSE_IN_AGA(cons(Head, Tail), SoFar, Reversed) → REVERSE_IN_AAA(Tail, cons(Head, SoFar), Reversed)
REVERSE_IN_AAA(cons(Head, Tail), SoFar, Reversed) → U16_AAA(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
REVERSE_IN_AAA(cons(Head, Tail), SoFar, Reversed) → REVERSE_IN_AAA(Tail, cons(Head, SoFar), Reversed)
U13_AG(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_AG(Line, Lines, coil_it_in_ag(Lines, odd))
U13_AG(Line, Lines, reverse2_out_aa(Line, Line1)) → COIL_IT_IN_AG(Lines, odd)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
snake_in_gaa(Pattern, Cols, Rows) → U5_gaa(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_gaa(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_gaa(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_aaaa(nil, X, X1, nil) → produce_snake_out_aaaa(nil, X, X1, nil)
produce_snake_in_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_aaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_aaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_aaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_aaaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_gaa(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_gaa(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
coil_it_in_ag(nil, X) → coil_it_out_ag(nil, X)
coil_it_in_ag(cons(Line, Lines), odd) → U12_ag(Line, Lines, coil_it_in_ag(Lines, even))
coil_it_in_ag(cons(Line, Lines), even) → U13_ag(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
reverse_in_aaa(nil, Reversed, Reversed) → reverse_out_aaa(nil, Reversed, Reversed)
reverse_in_aaa(cons(Head, Tail), SoFar, Reversed) → U16_aaa(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aaa(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aaa(cons(Head, Tail), SoFar, Reversed)
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_ag(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_ag(Line, Lines, coil_it_in_ag(Lines, odd))
U14_ag(Line, Lines, coil_it_out_ag(Lines, odd)) → coil_it_out_ag(cons(Line, Lines), even)
U12_ag(Line, Lines, coil_it_out_ag(Lines, even)) → coil_it_out_ag(cons(Line, Lines), odd)
U7_gaa(Pattern, Cols, Rows, coil_it_out_ag(Snake, odd)) → snake_out_gaa(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_gaa(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
REVERSE_IN_AAA(cons(Head, Tail), SoFar, Reversed) → REVERSE_IN_AAA(Tail, cons(Head, SoFar), Reversed)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
snake_in_gaa(Pattern, Cols, Rows) → U5_gaa(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_gaa(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_gaa(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_aaaa(nil, X, X1, nil) → produce_snake_out_aaaa(nil, X, X1, nil)
produce_snake_in_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_aaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_aaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_aaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_aaaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_gaa(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_gaa(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
coil_it_in_ag(nil, X) → coil_it_out_ag(nil, X)
coil_it_in_ag(cons(Line, Lines), odd) → U12_ag(Line, Lines, coil_it_in_ag(Lines, even))
coil_it_in_ag(cons(Line, Lines), even) → U13_ag(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
reverse_in_aaa(nil, Reversed, Reversed) → reverse_out_aaa(nil, Reversed, Reversed)
reverse_in_aaa(cons(Head, Tail), SoFar, Reversed) → U16_aaa(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aaa(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aaa(cons(Head, Tail), SoFar, Reversed)
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_ag(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_ag(Line, Lines, coil_it_in_ag(Lines, odd))
U14_ag(Line, Lines, coil_it_out_ag(Lines, odd)) → coil_it_out_ag(cons(Line, Lines), even)
U12_ag(Line, Lines, coil_it_out_ag(Lines, even)) → coil_it_out_ag(cons(Line, Lines), odd)
U7_gaa(Pattern, Cols, Rows, coil_it_out_ag(Snake, odd)) → snake_out_gaa(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_gaa(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
REVERSE_IN_AAA(cons(Head, Tail), SoFar, Reversed) → REVERSE_IN_AAA(Tail, cons(Head, SoFar), Reversed)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ NonTerminationProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
REVERSE_IN_AAA → REVERSE_IN_AAA
REVERSE_IN_AAA → REVERSE_IN_AAA
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
COIL_IT_IN_AG(cons(Line, Lines), odd) → COIL_IT_IN_AG(Lines, even)
COIL_IT_IN_AG(cons(Line, Lines), even) → U13_AG(Line, Lines, reverse2_in_aa(Line, Line1))
U13_AG(Line, Lines, reverse2_out_aa(Line, Line1)) → COIL_IT_IN_AG(Lines, odd)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
snake_in_gaa(Pattern, Cols, Rows) → U5_gaa(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_gaa(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_gaa(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_aaaa(nil, X, X1, nil) → produce_snake_out_aaaa(nil, X, X1, nil)
produce_snake_in_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_aaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_aaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_aaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_aaaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_gaa(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_gaa(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
coil_it_in_ag(nil, X) → coil_it_out_ag(nil, X)
coil_it_in_ag(cons(Line, Lines), odd) → U12_ag(Line, Lines, coil_it_in_ag(Lines, even))
coil_it_in_ag(cons(Line, Lines), even) → U13_ag(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
reverse_in_aaa(nil, Reversed, Reversed) → reverse_out_aaa(nil, Reversed, Reversed)
reverse_in_aaa(cons(Head, Tail), SoFar, Reversed) → U16_aaa(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aaa(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aaa(cons(Head, Tail), SoFar, Reversed)
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_ag(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_ag(Line, Lines, coil_it_in_ag(Lines, odd))
U14_ag(Line, Lines, coil_it_out_ag(Lines, odd)) → coil_it_out_ag(cons(Line, Lines), even)
U12_ag(Line, Lines, coil_it_out_ag(Lines, even)) → coil_it_out_ag(cons(Line, Lines), odd)
U7_gaa(Pattern, Cols, Rows, coil_it_out_ag(Snake, odd)) → snake_out_gaa(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_gaa(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
COIL_IT_IN_AG(cons(Line, Lines), odd) → COIL_IT_IN_AG(Lines, even)
COIL_IT_IN_AG(cons(Line, Lines), even) → U13_AG(Line, Lines, reverse2_in_aa(Line, Line1))
U13_AG(Line, Lines, reverse2_out_aa(Line, Line1)) → COIL_IT_IN_AG(Lines, odd)
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
reverse_in_aaa(nil, Reversed, Reversed) → reverse_out_aaa(nil, Reversed, Reversed)
reverse_in_aaa(cons(Head, Tail), SoFar, Reversed) → U16_aaa(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aaa(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aaa(cons(Head, Tail), SoFar, Reversed)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Narrowing
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
COIL_IT_IN_AG(odd) → COIL_IT_IN_AG(even)
COIL_IT_IN_AG(even) → U13_AG(reverse2_in_aa)
U13_AG(reverse2_out_aa) → COIL_IT_IN_AG(odd)
reverse2_in_aa → U15_aa(reverse_in_aga(nil))
U15_aa(reverse_out_aga) → reverse2_out_aa
reverse_in_aga(Reversed) → reverse_out_aga
reverse_in_aga(SoFar) → U16_aga(reverse_in_aaa)
U16_aga(reverse_out_aaa) → reverse_out_aga
reverse_in_aaa → reverse_out_aaa
reverse_in_aaa → U16_aaa(reverse_in_aaa)
U16_aaa(reverse_out_aaa) → reverse_out_aaa
reverse2_in_aa
U15_aa(x0)
reverse_in_aga(x0)
U16_aga(x0)
reverse_in_aaa
U16_aaa(x0)
COIL_IT_IN_AG(even) → U13_AG(U15_aa(reverse_in_aga(nil)))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Narrowing
↳ QDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
COIL_IT_IN_AG(even) → U13_AG(U15_aa(reverse_in_aga(nil)))
COIL_IT_IN_AG(odd) → COIL_IT_IN_AG(even)
U13_AG(reverse2_out_aa) → COIL_IT_IN_AG(odd)
reverse2_in_aa → U15_aa(reverse_in_aga(nil))
U15_aa(reverse_out_aga) → reverse2_out_aa
reverse_in_aga(Reversed) → reverse_out_aga
reverse_in_aga(SoFar) → U16_aga(reverse_in_aaa)
U16_aga(reverse_out_aaa) → reverse_out_aga
reverse_in_aaa → reverse_out_aaa
reverse_in_aaa → U16_aaa(reverse_in_aaa)
U16_aaa(reverse_out_aaa) → reverse_out_aaa
reverse2_in_aa
U15_aa(x0)
reverse_in_aga(x0)
U16_aga(x0)
reverse_in_aaa
U16_aaa(x0)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Narrowing
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
COIL_IT_IN_AG(even) → U13_AG(U15_aa(reverse_in_aga(nil)))
COIL_IT_IN_AG(odd) → COIL_IT_IN_AG(even)
U13_AG(reverse2_out_aa) → COIL_IT_IN_AG(odd)
reverse_in_aga(Reversed) → reverse_out_aga
reverse_in_aga(SoFar) → U16_aga(reverse_in_aaa)
U15_aa(reverse_out_aga) → reverse2_out_aa
reverse_in_aaa → reverse_out_aaa
reverse_in_aaa → U16_aaa(reverse_in_aaa)
U16_aga(reverse_out_aaa) → reverse_out_aga
U16_aaa(reverse_out_aaa) → reverse_out_aaa
reverse2_in_aa
U15_aa(x0)
reverse_in_aga(x0)
U16_aga(x0)
reverse_in_aaa
U16_aaa(x0)
reverse2_in_aa
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Narrowing
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ NonTerminationProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
COIL_IT_IN_AG(even) → U13_AG(U15_aa(reverse_in_aga(nil)))
COIL_IT_IN_AG(odd) → COIL_IT_IN_AG(even)
U13_AG(reverse2_out_aa) → COIL_IT_IN_AG(odd)
reverse_in_aga(Reversed) → reverse_out_aga
reverse_in_aga(SoFar) → U16_aga(reverse_in_aaa)
U15_aa(reverse_out_aga) → reverse2_out_aa
reverse_in_aaa → reverse_out_aaa
reverse_in_aaa → U16_aaa(reverse_in_aaa)
U16_aga(reverse_out_aaa) → reverse_out_aga
U16_aaa(reverse_out_aaa) → reverse_out_aaa
U15_aa(x0)
reverse_in_aga(x0)
U16_aga(x0)
reverse_in_aaa
U16_aaa(x0)
COIL_IT_IN_AG(even) → U13_AG(U15_aa(reverse_in_aga(nil)))
COIL_IT_IN_AG(odd) → COIL_IT_IN_AG(even)
U13_AG(reverse2_out_aa) → COIL_IT_IN_AG(odd)
reverse_in_aga(Reversed) → reverse_out_aga
reverse_in_aga(SoFar) → U16_aga(reverse_in_aaa)
U15_aa(reverse_out_aga) → reverse2_out_aa
reverse_in_aaa → reverse_out_aaa
reverse_in_aaa → U16_aaa(reverse_in_aaa)
U16_aga(reverse_out_aaa) → reverse_out_aga
U16_aaa(reverse_out_aaa) → reverse_out_aaa
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
PART_OF_SNAKE_IN_AAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → PART_OF_SNAKE_IN_AAAA(R, Rings, RestSnake, RestRings)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
snake_in_gaa(Pattern, Cols, Rows) → U5_gaa(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_gaa(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_gaa(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_aaaa(nil, X, X1, nil) → produce_snake_out_aaaa(nil, X, X1, nil)
produce_snake_in_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_aaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_aaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_aaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_aaaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_gaa(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_gaa(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
coil_it_in_ag(nil, X) → coil_it_out_ag(nil, X)
coil_it_in_ag(cons(Line, Lines), odd) → U12_ag(Line, Lines, coil_it_in_ag(Lines, even))
coil_it_in_ag(cons(Line, Lines), even) → U13_ag(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
reverse_in_aaa(nil, Reversed, Reversed) → reverse_out_aaa(nil, Reversed, Reversed)
reverse_in_aaa(cons(Head, Tail), SoFar, Reversed) → U16_aaa(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aaa(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aaa(cons(Head, Tail), SoFar, Reversed)
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_ag(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_ag(Line, Lines, coil_it_in_ag(Lines, odd))
U14_ag(Line, Lines, coil_it_out_ag(Lines, odd)) → coil_it_out_ag(cons(Line, Lines), even)
U12_ag(Line, Lines, coil_it_out_ag(Lines, even)) → coil_it_out_ag(cons(Line, Lines), odd)
U7_gaa(Pattern, Cols, Rows, coil_it_out_ag(Snake, odd)) → snake_out_gaa(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_gaa(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
PART_OF_SNAKE_IN_AAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → PART_OF_SNAKE_IN_AAAA(R, Rings, RestSnake, RestRings)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ NonTerminationProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
PART_OF_SNAKE_IN_AAAA → PART_OF_SNAKE_IN_AAAA
PART_OF_SNAKE_IN_AAAA → PART_OF_SNAKE_IN_AAAA
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
U9_AAAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → PRODUCE_SNAKE_IN_AAAA(Rows, Cols, NewInfSnake, Tail)
PRODUCE_SNAKE_IN_AAAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_AAAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
snake_in_gaa(Pattern, Cols, Rows) → U5_gaa(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_gaa(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_gaa(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_aaaa(nil, X, X1, nil) → produce_snake_out_aaaa(nil, X, X1, nil)
produce_snake_in_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_aaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_aaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_aaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_aaaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_gaa(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_gaa(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
coil_it_in_ag(nil, X) → coil_it_out_ag(nil, X)
coil_it_in_ag(cons(Line, Lines), odd) → U12_ag(Line, Lines, coil_it_in_ag(Lines, even))
coil_it_in_ag(cons(Line, Lines), even) → U13_ag(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
reverse_in_aaa(nil, Reversed, Reversed) → reverse_out_aaa(nil, Reversed, Reversed)
reverse_in_aaa(cons(Head, Tail), SoFar, Reversed) → U16_aaa(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aaa(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aaa(cons(Head, Tail), SoFar, Reversed)
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_ag(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_ag(Line, Lines, coil_it_in_ag(Lines, odd))
U14_ag(Line, Lines, coil_it_out_ag(Lines, odd)) → coil_it_out_ag(cons(Line, Lines), even)
U12_ag(Line, Lines, coil_it_out_ag(Lines, even)) → coil_it_out_ag(cons(Line, Lines), odd)
U7_gaa(Pattern, Cols, Rows, coil_it_out_ag(Snake, odd)) → snake_out_gaa(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_gaa(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
U9_AAAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → PRODUCE_SNAKE_IN_AAAA(Rows, Cols, NewInfSnake, Tail)
PRODUCE_SNAKE_IN_AAAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_AAAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_aaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_aaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_aaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Narrowing
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
U9_AAAA(part_of_snake_out_aaaa) → PRODUCE_SNAKE_IN_AAAA
PRODUCE_SNAKE_IN_AAAA → U9_AAAA(part_of_snake_in_aaaa)
part_of_snake_in_aaaa → part_of_snake_out_aaaa
part_of_snake_in_aaaa → U11_aaaa(part_of_snake_in_aaaa)
U11_aaaa(part_of_snake_out_aaaa) → part_of_snake_out_aaaa
part_of_snake_in_aaaa
U11_aaaa(x0)
PRODUCE_SNAKE_IN_AAAA → U9_AAAA(U11_aaaa(part_of_snake_in_aaaa))
PRODUCE_SNAKE_IN_AAAA → U9_AAAA(part_of_snake_out_aaaa)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Narrowing
↳ QDP
↳ NonTerminationProof
↳ PiDP
↳ PiDP
↳ PrologToPiTRSProof
PRODUCE_SNAKE_IN_AAAA → U9_AAAA(U11_aaaa(part_of_snake_in_aaaa))
PRODUCE_SNAKE_IN_AAAA → U9_AAAA(part_of_snake_out_aaaa)
U9_AAAA(part_of_snake_out_aaaa) → PRODUCE_SNAKE_IN_AAAA
part_of_snake_in_aaaa → part_of_snake_out_aaaa
part_of_snake_in_aaaa → U11_aaaa(part_of_snake_in_aaaa)
U11_aaaa(part_of_snake_out_aaaa) → part_of_snake_out_aaaa
part_of_snake_in_aaaa
U11_aaaa(x0)
PRODUCE_SNAKE_IN_AAAA → U9_AAAA(U11_aaaa(part_of_snake_in_aaaa))
PRODUCE_SNAKE_IN_AAAA → U9_AAAA(part_of_snake_out_aaaa)
U9_AAAA(part_of_snake_out_aaaa) → PRODUCE_SNAKE_IN_AAAA
part_of_snake_in_aaaa → part_of_snake_out_aaaa
part_of_snake_in_aaaa → U11_aaaa(part_of_snake_in_aaaa)
U11_aaaa(part_of_snake_out_aaaa) → part_of_snake_out_aaaa
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PrologToPiTRSProof
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → INFINITE_SNAKE_IN_GAA(R, T, S)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
snake_in_gaa(Pattern, Cols, Rows) → U5_gaa(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_gaa(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_gaa(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_aaaa(nil, X, X1, nil) → produce_snake_out_aaaa(nil, X, X1, nil)
produce_snake_in_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_aaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_aaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_aaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_aaaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_gaa(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_gaa(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
coil_it_in_ag(nil, X) → coil_it_out_ag(nil, X)
coil_it_in_ag(cons(Line, Lines), odd) → U12_ag(Line, Lines, coil_it_in_ag(Lines, even))
coil_it_in_ag(cons(Line, Lines), even) → U13_ag(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
reverse_in_aaa(nil, Reversed, Reversed) → reverse_out_aaa(nil, Reversed, Reversed)
reverse_in_aaa(cons(Head, Tail), SoFar, Reversed) → U16_aaa(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aaa(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aaa(cons(Head, Tail), SoFar, Reversed)
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_ag(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_ag(Line, Lines, coil_it_in_ag(Lines, odd))
U14_ag(Line, Lines, coil_it_out_ag(Lines, odd)) → coil_it_out_ag(cons(Line, Lines), even)
U12_ag(Line, Lines, coil_it_out_ag(Lines, even)) → coil_it_out_ag(cons(Line, Lines), odd)
U7_gaa(Pattern, Cols, Rows, coil_it_out_ag(Snake, odd)) → snake_out_gaa(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_gaa(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PrologToPiTRSProof
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → INFINITE_SNAKE_IN_GAA(R, T, S)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
↳ PrologToPiTRSProof
INFINITE_SNAKE_IN_GAA(cons(A, R)) → INFINITE_SNAKE_IN_GAA(R)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PrologToPiTRSProof
S2L_IN_GA(s(X), cons(X1, Y)) → S2L_IN_GA(X, Y)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
snake_in_gaa(Pattern, Cols, Rows) → U5_gaa(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_gaa(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_gaa(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_aaaa(nil, X, X1, nil) → produce_snake_out_aaaa(nil, X, X1, nil)
produce_snake_in_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_aaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_aaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_aaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_aaaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_gaa(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_gaa(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
coil_it_in_ag(nil, X) → coil_it_out_ag(nil, X)
coil_it_in_ag(cons(Line, Lines), odd) → U12_ag(Line, Lines, coil_it_in_ag(Lines, even))
coil_it_in_ag(cons(Line, Lines), even) → U13_ag(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
reverse_in_aaa(nil, Reversed, Reversed) → reverse_out_aaa(nil, Reversed, Reversed)
reverse_in_aaa(cons(Head, Tail), SoFar, Reversed) → U16_aaa(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aaa(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aaa(cons(Head, Tail), SoFar, Reversed)
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_ag(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_ag(Line, Lines, coil_it_in_ag(Lines, odd))
U14_ag(Line, Lines, coil_it_out_ag(Lines, odd)) → coil_it_out_ag(cons(Line, Lines), even)
U12_ag(Line, Lines, coil_it_out_ag(Lines, even)) → coil_it_out_ag(cons(Line, Lines), odd)
U7_gaa(Pattern, Cols, Rows, coil_it_out_ag(Snake, odd)) → snake_out_gaa(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_gaa(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PrologToPiTRSProof
S2L_IN_GA(s(X), cons(X1, Y)) → S2L_IN_GA(X, Y)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PrologToPiTRSProof
S2L_IN_GA(s(X)) → S2L_IN_GA(X)
From the DPs we obtained the following set of size-change graphs:
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
snake_in_gaa(Pattern, Cols, Rows) → U5_gaa(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_gaa(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_gaa(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_aaaa(nil, X, X1, nil) → produce_snake_out_aaaa(nil, X, X1, nil)
produce_snake_in_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_aaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_aaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_aaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_aaaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_gaa(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_gaa(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
coil_it_in_ag(nil, X) → coil_it_out_ag(nil, X)
coil_it_in_ag(cons(Line, Lines), odd) → U12_ag(Line, Lines, coil_it_in_ag(Lines, even))
coil_it_in_ag(cons(Line, Lines), even) → U13_ag(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
reverse_in_aaa(nil, Reversed, Reversed) → reverse_out_aaa(nil, Reversed, Reversed)
reverse_in_aaa(cons(Head, Tail), SoFar, Reversed) → U16_aaa(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aaa(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aaa(cons(Head, Tail), SoFar, Reversed)
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_ag(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_ag(Line, Lines, coil_it_in_ag(Lines, odd))
U14_ag(Line, Lines, coil_it_out_ag(Lines, odd)) → coil_it_out_ag(cons(Line, Lines), even)
U12_ag(Line, Lines, coil_it_out_ag(Lines, even)) → coil_it_out_ag(cons(Line, Lines), odd)
U7_gaa(Pattern, Cols, Rows, coil_it_out_ag(Snake, odd)) → snake_out_gaa(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_gaa(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
snake_in_gaa(Pattern, Cols, Rows) → U5_gaa(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_gaa(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_gaa(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_aaaa(nil, X, X1, nil) → produce_snake_out_aaaa(nil, X, X1, nil)
produce_snake_in_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_aaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_aaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_aaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_aaaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_gaa(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_gaa(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
coil_it_in_ag(nil, X) → coil_it_out_ag(nil, X)
coil_it_in_ag(cons(Line, Lines), odd) → U12_ag(Line, Lines, coil_it_in_ag(Lines, even))
coil_it_in_ag(cons(Line, Lines), even) → U13_ag(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
reverse_in_aaa(nil, Reversed, Reversed) → reverse_out_aaa(nil, Reversed, Reversed)
reverse_in_aaa(cons(Head, Tail), SoFar, Reversed) → U16_aaa(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aaa(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aaa(cons(Head, Tail), SoFar, Reversed)
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_ag(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_ag(Line, Lines, coil_it_in_ag(Lines, odd))
U14_ag(Line, Lines, coil_it_out_ag(Lines, odd)) → coil_it_out_ag(cons(Line, Lines), even)
U12_ag(Line, Lines, coil_it_out_ag(Lines, even)) → coil_it_out_ag(cons(Line, Lines), odd)
U7_gaa(Pattern, Cols, Rows, coil_it_out_ag(Snake, odd)) → snake_out_gaa(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_gaa(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
TEST_SNAKE_IN_GGG(Pattern, C, R) → U1_GGG(Pattern, C, R, s2l_in_ga(C, Cols))
TEST_SNAKE_IN_GGG(Pattern, C, R) → S2L_IN_GA(C, Cols)
S2L_IN_GA(s(X), cons(X1, Y)) → U4_GA(X, X1, Y, s2l_in_ga(X, Y))
S2L_IN_GA(s(X), cons(X1, Y)) → S2L_IN_GA(X, Y)
U1_GGG(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_GGG(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U1_GGG(Pattern, C, R, s2l_out_ga(C, Cols)) → S2L_IN_GA(R, Rows)
U2_GGG(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_GGG(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
U2_GGG(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → SNAKE_IN_GAA(Pattern, Cols, Rows)
SNAKE_IN_GAA(Pattern, Cols, Rows) → U5_GAA(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
SNAKE_IN_GAA(Pattern, Cols, Rows) → INFINITE_SNAKE_IN_GAA(Pattern, InfSnake, InfSnake)
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → U8_GAA(A, R, T, S, infinite_snake_in_gaa(R, T, S))
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → INFINITE_SNAKE_IN_GAA(R, T, S)
U5_GAA(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_GAA(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
U5_GAA(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → PRODUCE_SNAKE_IN_AAAA(Rows, Cols, InfSnake, Snake)
PRODUCE_SNAKE_IN_AAAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_AAAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
PRODUCE_SNAKE_IN_AAAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → PART_OF_SNAKE_IN_AAAA(Cols, InfSnake, NewInfSnake, Part)
PART_OF_SNAKE_IN_AAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_AAAA(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
PART_OF_SNAKE_IN_AAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → PART_OF_SNAKE_IN_AAAA(R, Rings, RestSnake, RestRings)
U9_AAAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_AAAA(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U9_AAAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → PRODUCE_SNAKE_IN_AAAA(Rows, Cols, NewInfSnake, Tail)
U6_GAA(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_GAA(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
U6_GAA(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → COIL_IT_IN_AG(Snake, odd)
COIL_IT_IN_AG(cons(Line, Lines), odd) → U12_AG(Line, Lines, coil_it_in_ag(Lines, even))
COIL_IT_IN_AG(cons(Line, Lines), odd) → COIL_IT_IN_AG(Lines, even)
COIL_IT_IN_AG(cons(Line, Lines), even) → U13_AG(Line, Lines, reverse2_in_aa(Line, Line1))
COIL_IT_IN_AG(cons(Line, Lines), even) → REVERSE2_IN_AA(Line, Line1)
REVERSE2_IN_AA(List, Reversed) → U15_AA(List, Reversed, reverse_in_aga(List, nil, Reversed))
REVERSE2_IN_AA(List, Reversed) → REVERSE_IN_AGA(List, nil, Reversed)
REVERSE_IN_AGA(cons(Head, Tail), SoFar, Reversed) → U16_AGA(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
REVERSE_IN_AGA(cons(Head, Tail), SoFar, Reversed) → REVERSE_IN_AAA(Tail, cons(Head, SoFar), Reversed)
REVERSE_IN_AAA(cons(Head, Tail), SoFar, Reversed) → U16_AAA(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
REVERSE_IN_AAA(cons(Head, Tail), SoFar, Reversed) → REVERSE_IN_AAA(Tail, cons(Head, SoFar), Reversed)
U13_AG(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_AG(Line, Lines, coil_it_in_ag(Lines, odd))
U13_AG(Line, Lines, reverse2_out_aa(Line, Line1)) → COIL_IT_IN_AG(Lines, odd)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
snake_in_gaa(Pattern, Cols, Rows) → U5_gaa(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_gaa(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_gaa(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_aaaa(nil, X, X1, nil) → produce_snake_out_aaaa(nil, X, X1, nil)
produce_snake_in_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_aaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_aaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_aaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_aaaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_gaa(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_gaa(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
coil_it_in_ag(nil, X) → coil_it_out_ag(nil, X)
coil_it_in_ag(cons(Line, Lines), odd) → U12_ag(Line, Lines, coil_it_in_ag(Lines, even))
coil_it_in_ag(cons(Line, Lines), even) → U13_ag(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
reverse_in_aaa(nil, Reversed, Reversed) → reverse_out_aaa(nil, Reversed, Reversed)
reverse_in_aaa(cons(Head, Tail), SoFar, Reversed) → U16_aaa(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aaa(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aaa(cons(Head, Tail), SoFar, Reversed)
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_ag(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_ag(Line, Lines, coil_it_in_ag(Lines, odd))
U14_ag(Line, Lines, coil_it_out_ag(Lines, odd)) → coil_it_out_ag(cons(Line, Lines), even)
U12_ag(Line, Lines, coil_it_out_ag(Lines, even)) → coil_it_out_ag(cons(Line, Lines), odd)
U7_gaa(Pattern, Cols, Rows, coil_it_out_ag(Snake, odd)) → snake_out_gaa(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_gaa(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
TEST_SNAKE_IN_GGG(Pattern, C, R) → U1_GGG(Pattern, C, R, s2l_in_ga(C, Cols))
TEST_SNAKE_IN_GGG(Pattern, C, R) → S2L_IN_GA(C, Cols)
S2L_IN_GA(s(X), cons(X1, Y)) → U4_GA(X, X1, Y, s2l_in_ga(X, Y))
S2L_IN_GA(s(X), cons(X1, Y)) → S2L_IN_GA(X, Y)
U1_GGG(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_GGG(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U1_GGG(Pattern, C, R, s2l_out_ga(C, Cols)) → S2L_IN_GA(R, Rows)
U2_GGG(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_GGG(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
U2_GGG(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → SNAKE_IN_GAA(Pattern, Cols, Rows)
SNAKE_IN_GAA(Pattern, Cols, Rows) → U5_GAA(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
SNAKE_IN_GAA(Pattern, Cols, Rows) → INFINITE_SNAKE_IN_GAA(Pattern, InfSnake, InfSnake)
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → U8_GAA(A, R, T, S, infinite_snake_in_gaa(R, T, S))
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → INFINITE_SNAKE_IN_GAA(R, T, S)
U5_GAA(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_GAA(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
U5_GAA(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → PRODUCE_SNAKE_IN_AAAA(Rows, Cols, InfSnake, Snake)
PRODUCE_SNAKE_IN_AAAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_AAAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
PRODUCE_SNAKE_IN_AAAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → PART_OF_SNAKE_IN_AAAA(Cols, InfSnake, NewInfSnake, Part)
PART_OF_SNAKE_IN_AAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_AAAA(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
PART_OF_SNAKE_IN_AAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → PART_OF_SNAKE_IN_AAAA(R, Rings, RestSnake, RestRings)
U9_AAAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_AAAA(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U9_AAAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → PRODUCE_SNAKE_IN_AAAA(Rows, Cols, NewInfSnake, Tail)
U6_GAA(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_GAA(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
U6_GAA(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → COIL_IT_IN_AG(Snake, odd)
COIL_IT_IN_AG(cons(Line, Lines), odd) → U12_AG(Line, Lines, coil_it_in_ag(Lines, even))
COIL_IT_IN_AG(cons(Line, Lines), odd) → COIL_IT_IN_AG(Lines, even)
COIL_IT_IN_AG(cons(Line, Lines), even) → U13_AG(Line, Lines, reverse2_in_aa(Line, Line1))
COIL_IT_IN_AG(cons(Line, Lines), even) → REVERSE2_IN_AA(Line, Line1)
REVERSE2_IN_AA(List, Reversed) → U15_AA(List, Reversed, reverse_in_aga(List, nil, Reversed))
REVERSE2_IN_AA(List, Reversed) → REVERSE_IN_AGA(List, nil, Reversed)
REVERSE_IN_AGA(cons(Head, Tail), SoFar, Reversed) → U16_AGA(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
REVERSE_IN_AGA(cons(Head, Tail), SoFar, Reversed) → REVERSE_IN_AAA(Tail, cons(Head, SoFar), Reversed)
REVERSE_IN_AAA(cons(Head, Tail), SoFar, Reversed) → U16_AAA(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
REVERSE_IN_AAA(cons(Head, Tail), SoFar, Reversed) → REVERSE_IN_AAA(Tail, cons(Head, SoFar), Reversed)
U13_AG(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_AG(Line, Lines, coil_it_in_ag(Lines, odd))
U13_AG(Line, Lines, reverse2_out_aa(Line, Line1)) → COIL_IT_IN_AG(Lines, odd)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
snake_in_gaa(Pattern, Cols, Rows) → U5_gaa(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_gaa(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_gaa(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_aaaa(nil, X, X1, nil) → produce_snake_out_aaaa(nil, X, X1, nil)
produce_snake_in_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_aaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_aaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_aaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_aaaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_gaa(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_gaa(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
coil_it_in_ag(nil, X) → coil_it_out_ag(nil, X)
coil_it_in_ag(cons(Line, Lines), odd) → U12_ag(Line, Lines, coil_it_in_ag(Lines, even))
coil_it_in_ag(cons(Line, Lines), even) → U13_ag(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
reverse_in_aaa(nil, Reversed, Reversed) → reverse_out_aaa(nil, Reversed, Reversed)
reverse_in_aaa(cons(Head, Tail), SoFar, Reversed) → U16_aaa(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aaa(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aaa(cons(Head, Tail), SoFar, Reversed)
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_ag(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_ag(Line, Lines, coil_it_in_ag(Lines, odd))
U14_ag(Line, Lines, coil_it_out_ag(Lines, odd)) → coil_it_out_ag(cons(Line, Lines), even)
U12_ag(Line, Lines, coil_it_out_ag(Lines, even)) → coil_it_out_ag(cons(Line, Lines), odd)
U7_gaa(Pattern, Cols, Rows, coil_it_out_ag(Snake, odd)) → snake_out_gaa(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_gaa(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
REVERSE_IN_AAA(cons(Head, Tail), SoFar, Reversed) → REVERSE_IN_AAA(Tail, cons(Head, SoFar), Reversed)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
snake_in_gaa(Pattern, Cols, Rows) → U5_gaa(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_gaa(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_gaa(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_aaaa(nil, X, X1, nil) → produce_snake_out_aaaa(nil, X, X1, nil)
produce_snake_in_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_aaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_aaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_aaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_aaaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_gaa(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_gaa(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
coil_it_in_ag(nil, X) → coil_it_out_ag(nil, X)
coil_it_in_ag(cons(Line, Lines), odd) → U12_ag(Line, Lines, coil_it_in_ag(Lines, even))
coil_it_in_ag(cons(Line, Lines), even) → U13_ag(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
reverse_in_aaa(nil, Reversed, Reversed) → reverse_out_aaa(nil, Reversed, Reversed)
reverse_in_aaa(cons(Head, Tail), SoFar, Reversed) → U16_aaa(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aaa(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aaa(cons(Head, Tail), SoFar, Reversed)
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_ag(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_ag(Line, Lines, coil_it_in_ag(Lines, odd))
U14_ag(Line, Lines, coil_it_out_ag(Lines, odd)) → coil_it_out_ag(cons(Line, Lines), even)
U12_ag(Line, Lines, coil_it_out_ag(Lines, even)) → coil_it_out_ag(cons(Line, Lines), odd)
U7_gaa(Pattern, Cols, Rows, coil_it_out_ag(Snake, odd)) → snake_out_gaa(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_gaa(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
REVERSE_IN_AAA(cons(Head, Tail), SoFar, Reversed) → REVERSE_IN_AAA(Tail, cons(Head, SoFar), Reversed)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ NonTerminationProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
REVERSE_IN_AAA → REVERSE_IN_AAA
REVERSE_IN_AAA → REVERSE_IN_AAA
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
COIL_IT_IN_AG(cons(Line, Lines), odd) → COIL_IT_IN_AG(Lines, even)
COIL_IT_IN_AG(cons(Line, Lines), even) → U13_AG(Line, Lines, reverse2_in_aa(Line, Line1))
U13_AG(Line, Lines, reverse2_out_aa(Line, Line1)) → COIL_IT_IN_AG(Lines, odd)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
snake_in_gaa(Pattern, Cols, Rows) → U5_gaa(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_gaa(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_gaa(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_aaaa(nil, X, X1, nil) → produce_snake_out_aaaa(nil, X, X1, nil)
produce_snake_in_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_aaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_aaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_aaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_aaaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_gaa(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_gaa(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
coil_it_in_ag(nil, X) → coil_it_out_ag(nil, X)
coil_it_in_ag(cons(Line, Lines), odd) → U12_ag(Line, Lines, coil_it_in_ag(Lines, even))
coil_it_in_ag(cons(Line, Lines), even) → U13_ag(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
reverse_in_aaa(nil, Reversed, Reversed) → reverse_out_aaa(nil, Reversed, Reversed)
reverse_in_aaa(cons(Head, Tail), SoFar, Reversed) → U16_aaa(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aaa(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aaa(cons(Head, Tail), SoFar, Reversed)
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_ag(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_ag(Line, Lines, coil_it_in_ag(Lines, odd))
U14_ag(Line, Lines, coil_it_out_ag(Lines, odd)) → coil_it_out_ag(cons(Line, Lines), even)
U12_ag(Line, Lines, coil_it_out_ag(Lines, even)) → coil_it_out_ag(cons(Line, Lines), odd)
U7_gaa(Pattern, Cols, Rows, coil_it_out_ag(Snake, odd)) → snake_out_gaa(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_gaa(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
COIL_IT_IN_AG(cons(Line, Lines), odd) → COIL_IT_IN_AG(Lines, even)
COIL_IT_IN_AG(cons(Line, Lines), even) → U13_AG(Line, Lines, reverse2_in_aa(Line, Line1))
U13_AG(Line, Lines, reverse2_out_aa(Line, Line1)) → COIL_IT_IN_AG(Lines, odd)
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
reverse_in_aaa(nil, Reversed, Reversed) → reverse_out_aaa(nil, Reversed, Reversed)
reverse_in_aaa(cons(Head, Tail), SoFar, Reversed) → U16_aaa(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aaa(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aaa(cons(Head, Tail), SoFar, Reversed)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Narrowing
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
COIL_IT_IN_AG(odd) → COIL_IT_IN_AG(even)
COIL_IT_IN_AG(even) → U13_AG(reverse2_in_aa)
U13_AG(reverse2_out_aa) → COIL_IT_IN_AG(odd)
reverse2_in_aa → U15_aa(reverse_in_aga(nil))
U15_aa(reverse_out_aga(nil)) → reverse2_out_aa
reverse_in_aga(Reversed) → reverse_out_aga(Reversed)
reverse_in_aga(SoFar) → U16_aga(SoFar, reverse_in_aaa)
U16_aga(SoFar, reverse_out_aaa) → reverse_out_aga(SoFar)
reverse_in_aaa → reverse_out_aaa
reverse_in_aaa → U16_aaa(reverse_in_aaa)
U16_aaa(reverse_out_aaa) → reverse_out_aaa
reverse2_in_aa
U15_aa(x0)
reverse_in_aga(x0)
U16_aga(x0, x1)
reverse_in_aaa
U16_aaa(x0)
COIL_IT_IN_AG(even) → U13_AG(U15_aa(reverse_in_aga(nil)))
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Narrowing
↳ QDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
COIL_IT_IN_AG(even) → U13_AG(U15_aa(reverse_in_aga(nil)))
COIL_IT_IN_AG(odd) → COIL_IT_IN_AG(even)
U13_AG(reverse2_out_aa) → COIL_IT_IN_AG(odd)
reverse2_in_aa → U15_aa(reverse_in_aga(nil))
U15_aa(reverse_out_aga(nil)) → reverse2_out_aa
reverse_in_aga(Reversed) → reverse_out_aga(Reversed)
reverse_in_aga(SoFar) → U16_aga(SoFar, reverse_in_aaa)
U16_aga(SoFar, reverse_out_aaa) → reverse_out_aga(SoFar)
reverse_in_aaa → reverse_out_aaa
reverse_in_aaa → U16_aaa(reverse_in_aaa)
U16_aaa(reverse_out_aaa) → reverse_out_aaa
reverse2_in_aa
U15_aa(x0)
reverse_in_aga(x0)
U16_aga(x0, x1)
reverse_in_aaa
U16_aaa(x0)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Narrowing
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
COIL_IT_IN_AG(even) → U13_AG(U15_aa(reverse_in_aga(nil)))
COIL_IT_IN_AG(odd) → COIL_IT_IN_AG(even)
U13_AG(reverse2_out_aa) → COIL_IT_IN_AG(odd)
reverse_in_aga(Reversed) → reverse_out_aga(Reversed)
reverse_in_aga(SoFar) → U16_aga(SoFar, reverse_in_aaa)
U15_aa(reverse_out_aga(nil)) → reverse2_out_aa
reverse_in_aaa → reverse_out_aaa
reverse_in_aaa → U16_aaa(reverse_in_aaa)
U16_aga(SoFar, reverse_out_aaa) → reverse_out_aga(SoFar)
U16_aaa(reverse_out_aaa) → reverse_out_aaa
reverse2_in_aa
U15_aa(x0)
reverse_in_aga(x0)
U16_aga(x0, x1)
reverse_in_aaa
U16_aaa(x0)
reverse2_in_aa
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Narrowing
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ NonTerminationProof
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
COIL_IT_IN_AG(even) → U13_AG(U15_aa(reverse_in_aga(nil)))
COIL_IT_IN_AG(odd) → COIL_IT_IN_AG(even)
U13_AG(reverse2_out_aa) → COIL_IT_IN_AG(odd)
reverse_in_aga(Reversed) → reverse_out_aga(Reversed)
reverse_in_aga(SoFar) → U16_aga(SoFar, reverse_in_aaa)
U15_aa(reverse_out_aga(nil)) → reverse2_out_aa
reverse_in_aaa → reverse_out_aaa
reverse_in_aaa → U16_aaa(reverse_in_aaa)
U16_aga(SoFar, reverse_out_aaa) → reverse_out_aga(SoFar)
U16_aaa(reverse_out_aaa) → reverse_out_aaa
U15_aa(x0)
reverse_in_aga(x0)
U16_aga(x0, x1)
reverse_in_aaa
U16_aaa(x0)
COIL_IT_IN_AG(even) → U13_AG(U15_aa(reverse_in_aga(nil)))
COIL_IT_IN_AG(odd) → COIL_IT_IN_AG(even)
U13_AG(reverse2_out_aa) → COIL_IT_IN_AG(odd)
reverse_in_aga(Reversed) → reverse_out_aga(Reversed)
reverse_in_aga(SoFar) → U16_aga(SoFar, reverse_in_aaa)
U15_aa(reverse_out_aga(nil)) → reverse2_out_aa
reverse_in_aaa → reverse_out_aaa
reverse_in_aaa → U16_aaa(reverse_in_aaa)
U16_aga(SoFar, reverse_out_aaa) → reverse_out_aga(SoFar)
U16_aaa(reverse_out_aaa) → reverse_out_aaa
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
↳ PiDP
PART_OF_SNAKE_IN_AAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → PART_OF_SNAKE_IN_AAAA(R, Rings, RestSnake, RestRings)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
snake_in_gaa(Pattern, Cols, Rows) → U5_gaa(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_gaa(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_gaa(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_aaaa(nil, X, X1, nil) → produce_snake_out_aaaa(nil, X, X1, nil)
produce_snake_in_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_aaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_aaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_aaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_aaaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_gaa(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_gaa(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
coil_it_in_ag(nil, X) → coil_it_out_ag(nil, X)
coil_it_in_ag(cons(Line, Lines), odd) → U12_ag(Line, Lines, coil_it_in_ag(Lines, even))
coil_it_in_ag(cons(Line, Lines), even) → U13_ag(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
reverse_in_aaa(nil, Reversed, Reversed) → reverse_out_aaa(nil, Reversed, Reversed)
reverse_in_aaa(cons(Head, Tail), SoFar, Reversed) → U16_aaa(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aaa(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aaa(cons(Head, Tail), SoFar, Reversed)
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_ag(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_ag(Line, Lines, coil_it_in_ag(Lines, odd))
U14_ag(Line, Lines, coil_it_out_ag(Lines, odd)) → coil_it_out_ag(cons(Line, Lines), even)
U12_ag(Line, Lines, coil_it_out_ag(Lines, even)) → coil_it_out_ag(cons(Line, Lines), odd)
U7_gaa(Pattern, Cols, Rows, coil_it_out_ag(Snake, odd)) → snake_out_gaa(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_gaa(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
↳ PiDP
PART_OF_SNAKE_IN_AAAA(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → PART_OF_SNAKE_IN_AAAA(R, Rings, RestSnake, RestRings)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ NonTerminationProof
↳ PiDP
↳ PiDP
↳ PiDP
PART_OF_SNAKE_IN_AAAA → PART_OF_SNAKE_IN_AAAA
PART_OF_SNAKE_IN_AAAA → PART_OF_SNAKE_IN_AAAA
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDP
U9_AAAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → PRODUCE_SNAKE_IN_AAAA(Rows, Cols, NewInfSnake, Tail)
PRODUCE_SNAKE_IN_AAAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_AAAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
snake_in_gaa(Pattern, Cols, Rows) → U5_gaa(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_gaa(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_gaa(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_aaaa(nil, X, X1, nil) → produce_snake_out_aaaa(nil, X, X1, nil)
produce_snake_in_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_aaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_aaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_aaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_aaaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_gaa(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_gaa(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
coil_it_in_ag(nil, X) → coil_it_out_ag(nil, X)
coil_it_in_ag(cons(Line, Lines), odd) → U12_ag(Line, Lines, coil_it_in_ag(Lines, even))
coil_it_in_ag(cons(Line, Lines), even) → U13_ag(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
reverse_in_aaa(nil, Reversed, Reversed) → reverse_out_aaa(nil, Reversed, Reversed)
reverse_in_aaa(cons(Head, Tail), SoFar, Reversed) → U16_aaa(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aaa(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aaa(cons(Head, Tail), SoFar, Reversed)
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_ag(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_ag(Line, Lines, coil_it_in_ag(Lines, odd))
U14_ag(Line, Lines, coil_it_out_ag(Lines, odd)) → coil_it_out_ag(cons(Line, Lines), even)
U12_ag(Line, Lines, coil_it_out_ag(Lines, even)) → coil_it_out_ag(cons(Line, Lines), odd)
U7_gaa(Pattern, Cols, Rows, coil_it_out_ag(Snake, odd)) → snake_out_gaa(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_gaa(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
↳ PiDP
U9_AAAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → PRODUCE_SNAKE_IN_AAAA(Rows, Cols, NewInfSnake, Tail)
PRODUCE_SNAKE_IN_AAAA(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_AAAA(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_aaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_aaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_aaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Narrowing
↳ PiDP
↳ PiDP
U9_AAAA(part_of_snake_out_aaaa) → PRODUCE_SNAKE_IN_AAAA
PRODUCE_SNAKE_IN_AAAA → U9_AAAA(part_of_snake_in_aaaa)
part_of_snake_in_aaaa → part_of_snake_out_aaaa
part_of_snake_in_aaaa → U11_aaaa(part_of_snake_in_aaaa)
U11_aaaa(part_of_snake_out_aaaa) → part_of_snake_out_aaaa
part_of_snake_in_aaaa
U11_aaaa(x0)
PRODUCE_SNAKE_IN_AAAA → U9_AAAA(U11_aaaa(part_of_snake_in_aaaa))
PRODUCE_SNAKE_IN_AAAA → U9_AAAA(part_of_snake_out_aaaa)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ Narrowing
↳ QDP
↳ NonTerminationProof
↳ PiDP
↳ PiDP
PRODUCE_SNAKE_IN_AAAA → U9_AAAA(U11_aaaa(part_of_snake_in_aaaa))
PRODUCE_SNAKE_IN_AAAA → U9_AAAA(part_of_snake_out_aaaa)
U9_AAAA(part_of_snake_out_aaaa) → PRODUCE_SNAKE_IN_AAAA
part_of_snake_in_aaaa → part_of_snake_out_aaaa
part_of_snake_in_aaaa → U11_aaaa(part_of_snake_in_aaaa)
U11_aaaa(part_of_snake_out_aaaa) → part_of_snake_out_aaaa
part_of_snake_in_aaaa
U11_aaaa(x0)
PRODUCE_SNAKE_IN_AAAA → U9_AAAA(U11_aaaa(part_of_snake_in_aaaa))
PRODUCE_SNAKE_IN_AAAA → U9_AAAA(part_of_snake_out_aaaa)
U9_AAAA(part_of_snake_out_aaaa) → PRODUCE_SNAKE_IN_AAAA
part_of_snake_in_aaaa → part_of_snake_out_aaaa
part_of_snake_in_aaaa → U11_aaaa(part_of_snake_in_aaaa)
U11_aaaa(part_of_snake_out_aaaa) → part_of_snake_out_aaaa
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → INFINITE_SNAKE_IN_GAA(R, T, S)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
snake_in_gaa(Pattern, Cols, Rows) → U5_gaa(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_gaa(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_gaa(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_aaaa(nil, X, X1, nil) → produce_snake_out_aaaa(nil, X, X1, nil)
produce_snake_in_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_aaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_aaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_aaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_aaaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_gaa(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_gaa(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
coil_it_in_ag(nil, X) → coil_it_out_ag(nil, X)
coil_it_in_ag(cons(Line, Lines), odd) → U12_ag(Line, Lines, coil_it_in_ag(Lines, even))
coil_it_in_ag(cons(Line, Lines), even) → U13_ag(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
reverse_in_aaa(nil, Reversed, Reversed) → reverse_out_aaa(nil, Reversed, Reversed)
reverse_in_aaa(cons(Head, Tail), SoFar, Reversed) → U16_aaa(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aaa(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aaa(cons(Head, Tail), SoFar, Reversed)
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_ag(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_ag(Line, Lines, coil_it_in_ag(Lines, odd))
U14_ag(Line, Lines, coil_it_out_ag(Lines, odd)) → coil_it_out_ag(cons(Line, Lines), even)
U12_ag(Line, Lines, coil_it_out_ag(Lines, even)) → coil_it_out_ag(cons(Line, Lines), odd)
U7_gaa(Pattern, Cols, Rows, coil_it_out_ag(Snake, odd)) → snake_out_gaa(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_gaa(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
INFINITE_SNAKE_IN_GAA(cons(A, R), cons(A, T), S) → INFINITE_SNAKE_IN_GAA(R, T, S)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
INFINITE_SNAKE_IN_GAA(cons(A, R)) → INFINITE_SNAKE_IN_GAA(R)
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
S2L_IN_GA(s(X), cons(X1, Y)) → S2L_IN_GA(X, Y)
test_snake_in_ggg(Pattern, C, R) → U1_ggg(Pattern, C, R, s2l_in_ga(C, Cols))
s2l_in_ga(0, nil) → s2l_out_ga(0, nil)
s2l_in_ga(s(X), cons(X1, Y)) → U4_ga(X, X1, Y, s2l_in_ga(X, Y))
U4_ga(X, X1, Y, s2l_out_ga(X, Y)) → s2l_out_ga(s(X), cons(X1, Y))
U1_ggg(Pattern, C, R, s2l_out_ga(C, Cols)) → U2_ggg(Pattern, C, R, Cols, s2l_in_ga(R, Rows))
U2_ggg(Pattern, C, R, Cols, s2l_out_ga(R, Rows)) → U3_ggg(Pattern, C, R, snake_in_gaa(Pattern, Cols, Rows))
snake_in_gaa(Pattern, Cols, Rows) → U5_gaa(Pattern, Cols, Rows, infinite_snake_in_gaa(Pattern, InfSnake, InfSnake))
infinite_snake_in_gaa(nil, S, S) → infinite_snake_out_gaa(nil, S, S)
infinite_snake_in_gaa(cons(A, R), cons(A, T), S) → U8_gaa(A, R, T, S, infinite_snake_in_gaa(R, T, S))
U8_gaa(A, R, T, S, infinite_snake_out_gaa(R, T, S)) → infinite_snake_out_gaa(cons(A, R), cons(A, T), S)
U5_gaa(Pattern, Cols, Rows, infinite_snake_out_gaa(Pattern, InfSnake, InfSnake)) → U6_gaa(Pattern, Cols, Rows, produce_snake_in_aaaa(Rows, Cols, InfSnake, Snake))
produce_snake_in_aaaa(nil, X, X1, nil) → produce_snake_out_aaaa(nil, X, X1, nil)
produce_snake_in_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail)) → U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_in_aaaa(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_in_aaaa(nil, RestSnake, RestSnake, nil) → part_of_snake_out_aaaa(nil, RestSnake, RestSnake, nil)
part_of_snake_in_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings)) → U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_in_aaaa(R, Rings, RestSnake, RestRings))
U11_aaaa(X, R, Ring, Rings, RestSnake, RestRings, part_of_snake_out_aaaa(R, Rings, RestSnake, RestRings)) → part_of_snake_out_aaaa(cons(X, R), cons(Ring, Rings), RestSnake, cons(Ring, RestRings))
U9_aaaa(X, Rows, Cols, InfSnake, Part, Tail, part_of_snake_out_aaaa(Cols, InfSnake, NewInfSnake, Part)) → U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_in_aaaa(Rows, Cols, NewInfSnake, Tail))
U10_aaaa(X, Rows, Cols, InfSnake, Part, Tail, produce_snake_out_aaaa(Rows, Cols, NewInfSnake, Tail)) → produce_snake_out_aaaa(cons(X, Rows), Cols, InfSnake, cons(Part, Tail))
U6_gaa(Pattern, Cols, Rows, produce_snake_out_aaaa(Rows, Cols, InfSnake, Snake)) → U7_gaa(Pattern, Cols, Rows, coil_it_in_ag(Snake, odd))
coil_it_in_ag(nil, X) → coil_it_out_ag(nil, X)
coil_it_in_ag(cons(Line, Lines), odd) → U12_ag(Line, Lines, coil_it_in_ag(Lines, even))
coil_it_in_ag(cons(Line, Lines), even) → U13_ag(Line, Lines, reverse2_in_aa(Line, Line1))
reverse2_in_aa(List, Reversed) → U15_aa(List, Reversed, reverse_in_aga(List, nil, Reversed))
reverse_in_aga(nil, Reversed, Reversed) → reverse_out_aga(nil, Reversed, Reversed)
reverse_in_aga(cons(Head, Tail), SoFar, Reversed) → U16_aga(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
reverse_in_aaa(nil, Reversed, Reversed) → reverse_out_aaa(nil, Reversed, Reversed)
reverse_in_aaa(cons(Head, Tail), SoFar, Reversed) → U16_aaa(Head, Tail, SoFar, Reversed, reverse_in_aaa(Tail, cons(Head, SoFar), Reversed))
U16_aaa(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aaa(cons(Head, Tail), SoFar, Reversed)
U16_aga(Head, Tail, SoFar, Reversed, reverse_out_aaa(Tail, cons(Head, SoFar), Reversed)) → reverse_out_aga(cons(Head, Tail), SoFar, Reversed)
U15_aa(List, Reversed, reverse_out_aga(List, nil, Reversed)) → reverse2_out_aa(List, Reversed)
U13_ag(Line, Lines, reverse2_out_aa(Line, Line1)) → U14_ag(Line, Lines, coil_it_in_ag(Lines, odd))
U14_ag(Line, Lines, coil_it_out_ag(Lines, odd)) → coil_it_out_ag(cons(Line, Lines), even)
U12_ag(Line, Lines, coil_it_out_ag(Lines, even)) → coil_it_out_ag(cons(Line, Lines), odd)
U7_gaa(Pattern, Cols, Rows, coil_it_out_ag(Snake, odd)) → snake_out_gaa(Pattern, Cols, Rows)
U3_ggg(Pattern, C, R, snake_out_gaa(Pattern, Cols, Rows)) → test_snake_out_ggg(Pattern, C, R)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
S2L_IN_GA(s(X), cons(X1, Y)) → S2L_IN_GA(X, Y)
↳ Prolog
↳ PrologToPiTRSProof
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
S2L_IN_GA(s(X)) → S2L_IN_GA(X)
From the DPs we obtained the following set of size-change graphs: